package b.b.e.a;

import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.content.res.Resources.Theme;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Outline;
import android.graphics.PorterDuff.Mode;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Drawable.Callback;
import android.graphics.drawable.Drawable.ConstantState;
import android.os.Build.VERSION;
import android.util.SparseArray;
import b.i.b.f;
import com.pgl.sys.ces.out.ISdkLite;
import java.util.Objects;

/* compiled from: DrawableContainer */
public class b extends Drawable implements Callback {
    public static final /* synthetic */ int m = 0;
    public c a;
    public Rect b;
    public Drawable c;
    public Drawable d;
    public int e = ISdkLite.REGION_UNSET;
    public boolean f;
    public int g = -1;
    public boolean h;
    public Runnable i;
    public long j;
    public long k;
    public b l;

    /* compiled from: DrawableContainer */
    public class a implements Runnable {
        public void run() {
            b.this.a(true);
            b.this.invalidateSelf();
        }
    }

    /* compiled from: DrawableContainer */
    public static class b implements Callback {
        public Callback a;

        public void invalidateDrawable(Drawable drawable) {
        }

        public void scheduleDrawable(Drawable drawable, Runnable runnable, long j) {
            Callback callback = this.a;
            if (callback != null) {
                callback.scheduleDrawable(drawable, runnable, j);
            }
        }

        public void unscheduleDrawable(Drawable drawable, Runnable runnable) {
            Callback callback = this.a;
            if (callback != null) {
                callback.unscheduleDrawable(drawable, runnable);
            }
        }
    }

    /* compiled from: DrawableContainer */
    public static abstract class c extends ConstantState {
        public int A;
        public int B;
        public boolean C;
        public ColorFilter D;
        public boolean E;
        public ColorStateList F;
        public Mode G;
        public boolean H;
        public boolean I;
        public final b a;
        public Resources b;
        public int c = 160;
        public int d;
        public int e;
        public SparseArray<ConstantState> f;
        public Drawable[] g;
        public int h;
        public boolean i;
        public boolean j;
        public Rect k;
        public boolean l;
        public boolean m;
        public int n;
        public int o;
        public int p;
        public int q;
        public boolean r;
        public int s;
        public boolean t;
        public boolean u;
        public boolean v;
        public boolean w;
        public boolean x;
        public boolean y;
        public int z;

        public c(c cVar, b bVar, Resources resources) {
            int i = 160;
            int i2 = 0;
            this.i = false;
            this.l = false;
            this.x = true;
            this.A = 0;
            this.B = 0;
            this.a = bVar;
            Resources resources2 = resources != null ? resources : cVar != null ? cVar.b : null;
            this.b = resources2;
            int i3 = cVar != null ? cVar.c : 0;
            int i4 = b.m;
            if (resources != null) {
                i3 = resources.getDisplayMetrics().densityDpi;
            }
            if (i3 != 0) {
                i = i3;
            }
            this.c = i;
            if (cVar != null) {
                this.d = cVar.d;
                this.e = cVar.e;
                this.v = true;
                this.w = true;
                this.i = cVar.i;
                this.l = cVar.l;
                this.x = cVar.x;
                this.y = cVar.y;
                this.z = cVar.z;
                this.A = cVar.A;
                this.B = cVar.B;
                this.C = cVar.C;
                this.D = cVar.D;
                this.E = cVar.E;
                this.F = cVar.F;
                this.G = cVar.G;
                this.H = cVar.H;
                this.I = cVar.I;
                if (cVar.c == i) {
                    if (cVar.j) {
                        this.k = new Rect(cVar.k);
                        this.j = true;
                    }
                    if (cVar.m) {
                        this.n = cVar.n;
                        this.o = cVar.o;
                        this.p = cVar.p;
                        this.q = cVar.q;
                        this.m = true;
                    }
                }
                if (cVar.r) {
                    this.s = cVar.s;
                    this.r = true;
                }
                if (cVar.t) {
                    this.u = cVar.u;
                    this.t = true;
                }
                Drawable[] drawableArr = cVar.g;
                this.g = new Drawable[drawableArr.length];
                this.h = cVar.h;
                SparseArray sparseArray = cVar.f;
                if (sparseArray != null) {
                    this.f = sparseArray.clone();
                } else {
                    this.f = new SparseArray(this.h);
                }
                int i5 = this.h;
                while (i2 < i5) {
                    if (drawableArr[i2] != null) {
                        ConstantState constantState = drawableArr[i2].getConstantState();
                        if (constantState != null) {
                            this.f.put(i2, constantState);
                        } else {
                            this.g[i2] = drawableArr[i2];
                        }
                    }
                    i2++;
                }
                return;
            }
            this.g = new Drawable[10];
            this.h = 0;
        }

        public final int a(Drawable drawable) {
            int i = this.h;
            if (i >= this.g.length) {
                int i2 = i + 10;
                b.b.e.a.d.a aVar = (b.b.e.a.d.a) this;
                Drawable[] drawableArr = new Drawable[i2];
                System.arraycopy(aVar.g, 0, drawableArr, 0, i);
                aVar.g = drawableArr;
                int[][] iArr = new int[i2][];
                System.arraycopy(aVar.J, 0, iArr, 0, i);
                aVar.J = iArr;
            }
            drawable.mutate();
            drawable.setVisible(false, true);
            drawable.setCallback(this.a);
            this.g[i] = drawable;
            this.h++;
            this.e = drawable.getChangingConfigurations() | this.e;
            this.r = false;
            this.t = false;
            this.k = null;
            this.j = false;
            this.m = false;
            this.v = false;
            return i;
        }

        public void b() {
            this.m = true;
            c();
            int i = this.h;
            Drawable[] drawableArr = this.g;
            this.o = -1;
            this.n = -1;
            int i2 = 0;
            this.q = 0;
            this.p = 0;
            while (i2 < i) {
                Drawable drawable = drawableArr[i2];
                int intrinsicWidth = drawable.getIntrinsicWidth();
                if (intrinsicWidth > this.n) {
                    this.n = intrinsicWidth;
                }
                intrinsicWidth = drawable.getIntrinsicHeight();
                if (intrinsicWidth > this.o) {
                    this.o = intrinsicWidth;
                }
                intrinsicWidth = drawable.getMinimumWidth();
                if (intrinsicWidth > this.p) {
                    this.p = intrinsicWidth;
                }
                int minimumHeight = drawable.getMinimumHeight();
                if (minimumHeight > this.q) {
                    this.q = minimumHeight;
                }
                i2++;
            }
        }

        public final void c() {
            SparseArray sparseArray = this.f;
            if (sparseArray != null) {
                int size = sparseArray.size();
                for (int i = 0; i < size; i++) {
                    int keyAt = this.f.keyAt(i);
                    ConstantState constantState = (ConstantState) this.f.valueAt(i);
                    Drawable[] drawableArr = this.g;
                    Drawable newDrawable = constantState.newDrawable(this.b);
                    if (VERSION.SDK_INT >= 23) {
                        newDrawable.setLayoutDirection(this.z);
                    }
                    newDrawable = newDrawable.mutate();
                    newDrawable.setCallback(this.a);
                    drawableArr[keyAt] = newDrawable;
                }
                this.f = null;
            }
        }

        public boolean canApplyTheme() {
            int i = this.h;
            Drawable[] drawableArr = this.g;
            for (int i2 = 0; i2 < i; i2++) {
                Drawable drawable = drawableArr[i2];
                if (drawable == null) {
                    ConstantState constantState = (ConstantState) this.f.get(i2);
                    if (constantState != null && constantState.canApplyTheme()) {
                        return true;
                    }
                } else if (drawable.canApplyTheme()) {
                    return true;
                }
            }
            return false;
        }

        public final Drawable d(int i) {
            Drawable drawable = this.g[i];
            if (drawable != null) {
                return drawable;
            }
            SparseArray sparseArray = this.f;
            if (sparseArray != null) {
                int indexOfKey = sparseArray.indexOfKey(i);
                if (indexOfKey >= 0) {
                    Drawable newDrawable = ((ConstantState) this.f.valueAt(indexOfKey)).newDrawable(this.b);
                    if (VERSION.SDK_INT >= 23) {
                        newDrawable.setLayoutDirection(this.z);
                    }
                    newDrawable = newDrawable.mutate();
                    newDrawable.setCallback(this.a);
                    this.g[i] = newDrawable;
                    this.f.removeAt(indexOfKey);
                    if (this.f.size() == 0) {
                        this.f = null;
                    }
                    return newDrawable;
                }
            }
            return null;
        }

        public abstract void e();

        public final void f(Resources resources) {
            if (resources != null) {
                this.b = resources;
                int i = b.m;
                int i2 = resources.getDisplayMetrics().densityDpi;
                if (i2 == 0) {
                    i2 = 160;
                }
                i = this.c;
                this.c = i2;
                if (i != i2) {
                    this.m = false;
                    this.j = false;
                }
            }
        }

        public int getChangingConfigurations() {
            return this.d | this.e;
        }
    }

    /* JADX WARNING: Removed duplicated region for block: B:18:0x0065  */
    /* JADX WARNING: Removed duplicated region for block: B:12:0x003f  */
    /* JADX WARNING: Removed duplicated region for block: B:24:? A:{SYNTHETIC, RETURN, SKIP} */
    /* JADX WARNING: Removed duplicated region for block: B:21:0x006a A:{SKIP} */
    public void a(boolean r14) {
        /*
        r13 = this;
        r0 = 1;
        r13.f = r0;
        r1 = android.os.SystemClock.uptimeMillis();
        r3 = r13.c;
        r4 = 255; // 0xff float:3.57E-43 double:1.26E-321;
        r6 = 0;
        r7 = 0;
        if (r3 == 0) goto L_0x0038;
    L_0x0010:
        r9 = r13.j;
        r11 = (r9 > r7 ? 1 : (r9 == r7 ? 0 : -1));
        if (r11 == 0) goto L_0x003a;
    L_0x0016:
        r11 = (r9 > r1 ? 1 : (r9 == r1 ? 0 : -1));
        if (r11 > 0) goto L_0x0022;
    L_0x001a:
        r9 = r13.e;
        r3.setAlpha(r9);
        r13.j = r7;
        goto L_0x003a;
    L_0x0022:
        r9 = r9 - r1;
        r9 = r9 * r4;
        r10 = (int) r9;
        r9 = r13.a;
        r9 = r9.A;
        r10 = r10 / r9;
        r9 = 255 - r10;
        r10 = r13.e;
        r9 = r9 * r10;
        r9 = r9 / 255;
        r3.setAlpha(r9);
        r3 = 1;
        goto L_0x003b;
    L_0x0038:
        r13.j = r7;
    L_0x003a:
        r3 = 0;
    L_0x003b:
        r9 = r13.d;
        if (r9 == 0) goto L_0x0065;
    L_0x003f:
        r10 = r13.k;
        r12 = (r10 > r7 ? 1 : (r10 == r7 ? 0 : -1));
        if (r12 == 0) goto L_0x0067;
    L_0x0045:
        r12 = (r10 > r1 ? 1 : (r10 == r1 ? 0 : -1));
        if (r12 > 0) goto L_0x0052;
    L_0x0049:
        r9.setVisible(r6, r6);
        r0 = 0;
        r13.d = r0;
        r13.k = r7;
        goto L_0x0067;
    L_0x0052:
        r10 = r10 - r1;
        r10 = r10 * r4;
        r3 = (int) r10;
        r4 = r13.a;
        r4 = r4.B;
        r3 = r3 / r4;
        r4 = r13.e;
        r3 = r3 * r4;
        r3 = r3 / 255;
        r9.setAlpha(r3);
        goto L_0x0068;
    L_0x0065:
        r13.k = r7;
    L_0x0067:
        r0 = r3;
    L_0x0068:
        if (r14 == 0) goto L_0x0074;
    L_0x006a:
        if (r0 == 0) goto L_0x0074;
    L_0x006c:
        r14 = r13.i;
        r3 = 16;
        r1 = r1 + r3;
        r13.scheduleSelf(r14, r1);
    L_0x0074:
        return;
        */
        throw new UnsupportedOperationException("Method not decompiled: b.b.e.a.b.a(boolean):void");
    }

    public void applyTheme(Theme theme) {
        c cVar = this.a;
        Objects.requireNonNull(cVar);
        if (theme != null) {
            cVar.c();
            int i = cVar.h;
            Drawable[] drawableArr = cVar.g;
            int i2 = 0;
            while (i2 < i) {
                if (drawableArr[i2] != null && drawableArr[i2].canApplyTheme()) {
                    drawableArr[i2].applyTheme(theme);
                    cVar.e |= drawableArr[i2].getChangingConfigurations();
                }
                i2++;
            }
            cVar.f(theme.getResources());
        }
    }

    public c b() {
        throw null;
    }

    public final void c(Drawable drawable) {
        if (this.l == null) {
            this.l = new b();
        }
        b bVar = this.l;
        bVar.a = drawable.getCallback();
        drawable.setCallback(bVar);
        try {
            if (this.a.A <= 0 && this.f) {
                drawable.setAlpha(this.e);
            }
            c cVar = this.a;
            if (cVar.E) {
                drawable.setColorFilter(cVar.D);
            } else {
                if (cVar.H) {
                    drawable.setTintList(cVar.F);
                }
                cVar = this.a;
                if (cVar.I) {
                    drawable.setTintMode(cVar.G);
                }
            }
            drawable.setVisible(isVisible(), true);
            drawable.setDither(this.a.x);
            drawable.setState(getState());
            drawable.setLevel(getLevel());
            drawable.setBounds(getBounds());
            if (VERSION.SDK_INT >= 23) {
                drawable.setLayoutDirection(getLayoutDirection());
            }
            drawable.setAutoMirrored(this.a.C);
            Rect rect = this.b;
            if (rect != null) {
                drawable.setHotspotBounds(rect.left, rect.top, rect.right, rect.bottom);
            }
            b bVar2 = this.l;
            Callback callback = bVar2.a;
            bVar2.a = null;
            drawable.setCallback(callback);
        } catch (Throwable th) {
            b bVar3 = this.l;
            Callback callback2 = bVar3.a;
            bVar3.a = null;
            drawable.setCallback(callback2);
        }
    }

    public boolean canApplyTheme() {
        return this.a.canApplyTheme();
    }

    /* JADX WARNING: Removed duplicated region for block: B:32:0x0073  */
    /* JADX WARNING: Removed duplicated region for block: B:31:0x006b  */
    public boolean d(int r10) {
        /*
        r9 = this;
        r0 = r9.g;
        r1 = 0;
        if (r10 != r0) goto L_0x0006;
    L_0x0005:
        return r1;
    L_0x0006:
        r2 = android.os.SystemClock.uptimeMillis();
        r0 = r9.a;
        r0 = r0.B;
        r4 = 0;
        r5 = 0;
        if (r0 <= 0) goto L_0x002e;
    L_0x0013:
        r0 = r9.d;
        if (r0 == 0) goto L_0x001a;
    L_0x0017:
        r0.setVisible(r1, r1);
    L_0x001a:
        r0 = r9.c;
        if (r0 == 0) goto L_0x0029;
    L_0x001e:
        r9.d = r0;
        r0 = r9.a;
        r0 = r0.B;
        r0 = (long) r0;
        r0 = r0 + r2;
        r9.k = r0;
        goto L_0x0035;
    L_0x0029:
        r9.d = r4;
        r9.k = r5;
        goto L_0x0035;
    L_0x002e:
        r0 = r9.c;
        if (r0 == 0) goto L_0x0035;
    L_0x0032:
        r0.setVisible(r1, r1);
    L_0x0035:
        if (r10 < 0) goto L_0x0055;
    L_0x0037:
        r0 = r9.a;
        r1 = r0.h;
        if (r10 >= r1) goto L_0x0055;
    L_0x003d:
        r0 = r0.d(r10);
        r9.c = r0;
        r9.g = r10;
        if (r0 == 0) goto L_0x005a;
    L_0x0047:
        r10 = r9.a;
        r10 = r10.A;
        if (r10 <= 0) goto L_0x0051;
    L_0x004d:
        r7 = (long) r10;
        r2 = r2 + r7;
        r9.j = r2;
    L_0x0051:
        r9.c(r0);
        goto L_0x005a;
    L_0x0055:
        r9.c = r4;
        r10 = -1;
        r9.g = r10;
    L_0x005a:
        r0 = r9.j;
        r10 = 1;
        r2 = (r0 > r5 ? 1 : (r0 == r5 ? 0 : -1));
        if (r2 != 0) goto L_0x0067;
    L_0x0061:
        r0 = r9.k;
        r2 = (r0 > r5 ? 1 : (r0 == r5 ? 0 : -1));
        if (r2 == 0) goto L_0x0079;
    L_0x0067:
        r0 = r9.i;
        if (r0 != 0) goto L_0x0073;
    L_0x006b:
        r0 = new b.b.e.a.b$a;
        r0.m290init();
        r9.i = r0;
        goto L_0x0076;
    L_0x0073:
        r9.unscheduleSelf(r0);
    L_0x0076:
        r9.a(r10);
    L_0x0079:
        r9.invalidateSelf();
        return r10;
        */
        throw new UnsupportedOperationException("Method not decompiled: b.b.e.a.b.d(int):boolean");
    }

    public void draw(Canvas canvas) {
        Drawable drawable = this.c;
        if (drawable != null) {
            drawable.draw(canvas);
        }
        drawable = this.d;
        if (drawable != null) {
            drawable.draw(canvas);
        }
    }

    public void e(c cVar) {
        throw null;
    }

    public int getAlpha() {
        return this.e;
    }

    public int getChangingConfigurations() {
        return super.getChangingConfigurations() | this.a.getChangingConfigurations();
    }

    public final ConstantState getConstantState() {
        boolean z;
        c cVar = this.a;
        synchronized (cVar) {
            z = false;
            if (cVar.v) {
                z = cVar.w;
            } else {
                cVar.c();
                cVar.v = true;
                int i = cVar.h;
                Drawable[] drawableArr = cVar.g;
                for (int i2 = 0; i2 < i; i2++) {
                    if (drawableArr[i2].getConstantState() == null) {
                        cVar.w = false;
                        break;
                    }
                }
                cVar.w = true;
                z = true;
            }
        }
        if (!z) {
            return null;
        }
        this.a.d = getChangingConfigurations();
        return this.a;
    }

    public Drawable getCurrent() {
        return this.c;
    }

    public void getHotspotBounds(Rect rect) {
        Rect rect2 = this.b;
        if (rect2 != null) {
            rect.set(rect2);
        } else {
            super.getHotspotBounds(rect);
        }
    }

    public int getIntrinsicHeight() {
        c cVar = this.a;
        if (cVar.l) {
            if (!cVar.m) {
                cVar.b();
            }
            return cVar.o;
        }
        Drawable drawable = this.c;
        return drawable != null ? drawable.getIntrinsicHeight() : -1;
    }

    public int getIntrinsicWidth() {
        c cVar = this.a;
        if (cVar.l) {
            if (!cVar.m) {
                cVar.b();
            }
            return cVar.n;
        }
        Drawable drawable = this.c;
        return drawable != null ? drawable.getIntrinsicWidth() : -1;
    }

    public int getMinimumHeight() {
        c cVar = this.a;
        if (cVar.l) {
            if (!cVar.m) {
                cVar.b();
            }
            return cVar.q;
        }
        Drawable drawable = this.c;
        return drawable != null ? drawable.getMinimumHeight() : 0;
    }

    public int getMinimumWidth() {
        c cVar = this.a;
        if (cVar.l) {
            if (!cVar.m) {
                cVar.b();
            }
            return cVar.p;
        }
        Drawable drawable = this.c;
        return drawable != null ? drawable.getMinimumWidth() : 0;
    }

    public int getOpacity() {
        Drawable drawable = this.c;
        int i = -2;
        if (drawable == null || !drawable.isVisible()) {
            return -2;
        }
        c cVar = this.a;
        if (cVar.r) {
            return cVar.s;
        }
        cVar.c();
        int i2 = cVar.h;
        Drawable[] drawableArr = cVar.g;
        if (i2 > 0) {
            i = drawableArr[0].getOpacity();
        }
        for (int i3 = 1; i3 < i2; i3++) {
            i = Drawable.resolveOpacity(i, drawableArr[i3].getOpacity());
        }
        cVar.s = i;
        cVar.r = true;
        return i;
    }

    public void getOutline(Outline outline) {
        Drawable drawable = this.c;
        if (drawable != null) {
            drawable.getOutline(outline);
        }
    }

    public boolean getPadding(Rect rect) {
        boolean z;
        c cVar = this.a;
        Rect rect2 = null;
        boolean z2 = true;
        if (!cVar.i) {
            Rect rect3 = cVar.k;
            if (rect3 != null || cVar.j) {
                rect2 = rect3;
            } else {
                cVar.c();
                rect3 = new Rect();
                int i = cVar.h;
                Drawable[] drawableArr = cVar.g;
                for (int i2 = 0; i2 < i; i2++) {
                    if (drawableArr[i2].getPadding(rect3)) {
                        if (rect2 == null) {
                            rect2 = new Rect(0, 0, 0, 0);
                        }
                        int i3 = rect3.left;
                        if (i3 > rect2.left) {
                            rect2.left = i3;
                        }
                        i3 = rect3.top;
                        if (i3 > rect2.top) {
                            rect2.top = i3;
                        }
                        i3 = rect3.right;
                        if (i3 > rect2.right) {
                            rect2.right = i3;
                        }
                        i3 = rect3.bottom;
                        if (i3 > rect2.bottom) {
                            rect2.bottom = i3;
                        }
                    }
                }
                cVar.j = true;
                cVar.k = rect2;
            }
        }
        if (rect2 != null) {
            rect.set(rect2);
            z = (((rect2.left | rect2.top) | rect2.bottom) | rect2.right) != 0;
        } else {
            Drawable drawable = this.c;
            z = drawable != null ? drawable.getPadding(rect) : super.getPadding(rect);
        }
        if (!(this.a.C && f.u0(this) == 1)) {
            z2 = false;
        }
        if (z2) {
            int i4 = rect.left;
            rect.left = rect.right;
            rect.right = i4;
        }
        return z;
    }

    public void invalidateDrawable(Drawable drawable) {
        c cVar = this.a;
        if (cVar != null) {
            cVar.r = false;
            cVar.t = false;
        }
        if (drawable == this.c && getCallback() != null) {
            getCallback().invalidateDrawable(this);
        }
    }

    public boolean isAutoMirrored() {
        return this.a.C;
    }

    public void jumpToCurrentState() {
        Object obj;
        Drawable drawable = this.d;
        Object obj2 = 1;
        if (drawable != null) {
            drawable.jumpToCurrentState();
            this.d = null;
            obj = 1;
        } else {
            obj = null;
        }
        Drawable drawable2 = this.c;
        if (drawable2 != null) {
            drawable2.jumpToCurrentState();
            if (this.f) {
                this.c.setAlpha(this.e);
            }
        }
        if (this.k != 0) {
            this.k = 0;
            obj = 1;
        }
        if (this.j != 0) {
            this.j = 0;
        } else {
            obj2 = obj;
        }
        if (obj2 != null) {
            invalidateSelf();
        }
    }

    public Drawable mutate() {
        if (!this.h && super.mutate() == this) {
            c b = b();
            b.e();
            e(b);
            this.h = true;
        }
        return this;
    }

    public void onBoundsChange(Rect rect) {
        Drawable drawable = this.d;
        if (drawable != null) {
            drawable.setBounds(rect);
        }
        drawable = this.c;
        if (drawable != null) {
            drawable.setBounds(rect);
        }
    }

    public boolean onLayoutDirectionChanged(int i) {
        c cVar = this.a;
        int i2 = this.g;
        int i3 = cVar.h;
        Drawable[] drawableArr = cVar.g;
        boolean z = false;
        for (int i4 = 0; i4 < i3; i4++) {
            if (drawableArr[i4] != null) {
                boolean layoutDirection = VERSION.SDK_INT >= 23 ? drawableArr[i4].setLayoutDirection(i) : false;
                if (i4 == i2) {
                    z = layoutDirection;
                }
            }
        }
        cVar.z = i;
        return z;
    }

    public boolean onLevelChange(int i) {
        Drawable drawable = this.d;
        if (drawable != null) {
            return drawable.setLevel(i);
        }
        drawable = this.c;
        return drawable != null ? drawable.setLevel(i) : false;
    }

    public boolean onStateChange(int[] iArr) {
        Drawable drawable = this.d;
        if (drawable != null) {
            return drawable.setState(iArr);
        }
        drawable = this.c;
        return drawable != null ? drawable.setState(iArr) : false;
    }

    public void scheduleDrawable(Drawable drawable, Runnable runnable, long j) {
        if (drawable == this.c && getCallback() != null) {
            getCallback().scheduleDrawable(this, runnable, j);
        }
    }

    public void setAlpha(int i) {
        if (!this.f || this.e != i) {
            this.f = true;
            this.e = i;
            Drawable drawable = this.c;
            if (drawable == null) {
                return;
            }
            if (this.j == 0) {
                drawable.setAlpha(i);
            } else {
                a(false);
            }
        }
    }

    public void setAutoMirrored(boolean z) {
        c cVar = this.a;
        if (cVar.C != z) {
            cVar.C = z;
            Drawable drawable = this.c;
            if (drawable != null) {
                drawable.setAutoMirrored(z);
            }
        }
    }

    public void setColorFilter(ColorFilter colorFilter) {
        c cVar = this.a;
        cVar.E = true;
        if (cVar.D != colorFilter) {
            cVar.D = colorFilter;
            Drawable drawable = this.c;
            if (drawable != null) {
                drawable.setColorFilter(colorFilter);
            }
        }
    }

    public void setDither(boolean z) {
        c cVar = this.a;
        if (cVar.x != z) {
            cVar.x = z;
            Drawable drawable = this.c;
            if (drawable != null) {
                drawable.setDither(z);
            }
        }
    }

    public void setHotspot(float f, float f2) {
        Drawable drawable = this.c;
        if (drawable != null) {
            drawable.setHotspot(f, f2);
        }
    }

    public void setHotspotBounds(int i, int i2, int i3, int i4) {
        Rect rect = this.b;
        if (rect == null) {
            this.b = new Rect(i, i2, i3, i4);
        } else {
            rect.set(i, i2, i3, i4);
        }
        Drawable drawable = this.c;
        if (drawable != null) {
            drawable.setHotspotBounds(i, i2, i3, i4);
        }
    }

    public void setTintList(ColorStateList colorStateList) {
        c cVar = this.a;
        cVar.H = true;
        if (cVar.F != colorStateList) {
            cVar.F = colorStateList;
            f.d1(this.c, colorStateList);
        }
    }

    public void setTintMode(Mode mode) {
        c cVar = this.a;
        cVar.I = true;
        if (cVar.G != mode) {
            cVar.G = mode;
            f.e1(this.c, mode);
        }
    }

    public boolean setVisible(boolean z, boolean z2) {
        boolean visible = super.setVisible(z, z2);
        Drawable drawable = this.d;
        if (drawable != null) {
            drawable.setVisible(z, z2);
        }
        drawable = this.c;
        if (drawable != null) {
            drawable.setVisible(z, z2);
        }
        return visible;
    }

    public void unscheduleDrawable(Drawable drawable, Runnable runnable) {
        if (drawable == this.c && getCallback() != null) {
            getCallback().unscheduleDrawable(this, runnable);
        }
    }
}
